<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<c:set var="contextPath" value="<%=request.getContextPath()%>"></c:set>

<div id="pub_area" class="pub_area">
            <div class="reply_area_left">
		   			<div class="reply_user_icon">
		          		 <a href="#" onclick="return false;" target="_blank"><img src="${contextPath}${user.headPhoto.thumbnailMini}" alt="" title=""></a>
		      		</div>
		   	</div>
		   	<div class="reply_area_right">
             	<form id="commentForm" action="${contextPath}/saveStarComment" method="post">
             		
	                			<div id="user_rate_${article.id}" class="user_rate" style="width: 160px;">
	                				<c:choose>
	                					<c:when test="${userComment != null}">
	                						
	                						<input  type="hidden" name="comment.id" value="${userComment.id}">
	                						<c:set var="rate" value="${userComment.offerRateObject.strPercent}"></c:set>
	                						<c:set var="rateInteger" value="${userComment.offerRateObject.integerPart}"></c:set>
	                						<c:set var="rateDecimal" value="${userComment.offerRateObject.decimalPart}"></c:set>
	                						<c:set var="content" value="${userComment.content}"></c:set>
	                					</c:when>
	                					<c:otherwise>
	                						<c:set var="content" value=""></c:set>
	                						<c:set var="rate" value="${article.rateObject.strPercent}"></c:set>
	                						<c:set var="rateInteger" value="${article.rateObject.integerPart}"></c:set>
	                						<c:set var="rateDecimal" value="${article.rateObject.decimalPart}"></c:set>
	                					</c:otherwise>
	                				</c:choose>
								    <div id="big_rate_bak_u${article.id}" class="big_rate_bak">
								        <b rate="2" onclick="javascript:up_rate(20,${article.id});">&nbsp;</b>
								        <b rate="4" onclick="javascript:up_rate(40,${article.id});">&nbsp;</b>
								        <b rate="6" onclick="javascript:up_rate(60,${article.id});">&nbsp;</b>
								        <b rate="8" onclick="javascript:up_rate(80,${article.id});">&nbsp;</b>
								        <b rate="10" onclick="javascript:up_rate(100);">&nbsp;</b>
								        <div id="big_rate_up_u${article.id}" style="width: 123.20000000000002px; display: block; height: 26px; " class="big_rate_up"></div>
								    </div>
								    <p><span style="width: 15px" id="s_u${article.id}" class="s">${rateInteger}</span><span style="font-size: 12px;color: #aaa;">(分享指数)</span></p>
								</div>
								<script type="text/javascript">
									get_rate("${rate}",'u${article.id}');
								</script>
								<input id="offerRate" type="hidden" name="comment.offerRate" value="${rateInteger}">
	                    <div id="formContent">
	                       <label for="title"><strong class="title-label">评论标题</strong></label>
	                    	<input id="commentTitle" name="comment.title" type="text" value="${userComment.title}">
	                    	<label for="content"><strong class="content-label">评论内容</strong></label>
	                    	<div id="formContent1" class="word_surplus sign-text"></div>
	                    	<textarea name="comment.content" style="height:200px;width:580px;">${content}</textarea>
	                    	<input  type="hidden" name="article.id" value="${article.id}">
	                    	
	                    </div>
	                    
                           <div class="submit_btn">
                           	<button type="button" class="btn btn-info" onclick="articleComment(this.form)">评论</button>
                           </div>
               </form>
               </div>
</div>